<?php 
$thistitle="30个类别300家淘宝旺铺收藏";
include("head.php");
$prefixurl="huangguandianpu";
$thispid=str_replace("_0_0","",str_replace("mm_","",$userpid));

function make_list(){
	global $prefix,$thispid;
	$list="";
	$cat=mysql_query("select * from ".$prefix."haodiantype");
	while($a=mysql_fetch_array($cat)){
		$list.="<div class='column'><div class='block'><p class='".$a['h_style']."'>".$a['h_name']."TOP10</p>";
		$list.= "<dl class='top_list header ".$a['h_style']."'><dd class='index'>&nbsp;</dd><dd class='name'>店铺名称</dd><dd class='image'>信用等级</dd></dl>";
		$sql="select * from ".$prefix."haodian where h_type=".$a['h_id']." order by h_id desc limit 10";
		$result=mysql_query($sql);
		$i=1;
		while($b=mysql_fetch_array($result)){
			$list.= "<dl class='top_list'><dd class='index item".$i."'>&nbsp;</dd><dd class='name'><a onclick='clickurl(\"".base64_encode(str_replace('15252835',$thispid,$b['h_link']))."\");'  href='javascript:;'>".$b['h_name']."</a></dd><dd class='image'><img src='images/level_".$b['h_level'].".gif' /></dd></dl>";
			$i++;
		}
		$list.= "</div></div>";
	}
	return $list;
}

$list=make_list();
include("foot.php");

$smar=new MySmarty($cache,$cachetime,$moban);
$smarty=$smar->get_smarty();
//head
$smarty->assign("thistitle",$thistitle);
$smarty->assign("q",$q);
$smarty->assign("result2",$result2);
$smarty->assign("webname",$webname);
$smarty->assign("postfix",$postfix);
$smarty->assign("description",$description);
$smarty->assign("keywords",$keywords);
$smarty->assign("website",$website);
$smarty->assign("searchkeys",$searchkeys);
$smarty->assign("newshops",$newshops);
$smarty->assign("toubiao",$show_topnav);
$smarty->assign("moban",$moban);
$smarty->assign("thispid",$thispid);


//category
$smarty->assign("prefixurl",$prefixurl);
$smarty->assign("lcat",$lcat);
$smarty->assign("lpro",$lpro);
$smarty->assign("lpage",$lpage);
$smarty->assign("rewrite_postfix",$rewrite_postfix);
$smarty->assign("ljoin",$ljoin);
//foot
$smarty->assign("links",$links);
$smarty->assign("QQ",$QQ);
$smarty->assign("ICP",$ICP);
$smarty->assign("tongji",$tongji);
$smarty->assign("jiathis",$jiathis);
//taobaohaodian
$smarty->assign("list",$list);


$smarty->display("taobaohaodian.html");
?>
